/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chp_05_interrupted;
import interrupted.VisualSuspendResume;
import ActionAdaptors.CloseWindowListener ;
import java.lang.* ;
import java.awt.* ;
import javax.swing.* ;
import java.awt.event.* ;
/**
 *
 * @author Mdbrown
 */
public class Main {

    /**
     * @param args the command line arguments
     */

    private static VisualSuspendResume vsr = null ;
    private static Thread T = null ;
    private Thread runThread ;
    private static JFrame  jframe  = null ;
    private static CloseWindowListener cwl = null ;
    private static int width = 300 ;
    private static int height = 300 ;


    public static void main(String[] args) {
        // TODO code application logic here

        vsr = new  VisualSuspendResume() ;
        T = new Thread(vsr);
        T.start();

        jframe = new JFrame("Visual Suspend Resume") ;
        jframe.setSize(width, height);
        cwl = new CloseWindowListener() ;
        jframe.addWindowListener(cwl );
        jframe.add(vsr);
        jframe.setVisible(true);


        

    }//end of main() method

}// end of Main Class
